package com.webchat.chat.model;

import com.webchat.chat.core.enums.ServiceStatus;
import com.webchat.chat.core.enums.SocketClientType;
import com.webchat.chat.core.tools.BaseModel;

import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Table(name = "socket_client")
public class SocketClient extends BaseModel implements Serializable {

    /**
     * 用户ID
     */
    @Column(name = "USER_ID")
    private String userId="1";

    /**
     * 客户端ID
     */
    @Column(name = "CLIENT_ID")
    private String clientId;
    /**
     * 是否连接
     */
    @Column(name = "CONNECTED")
    private Boolean connected;

    /**
     * 用户名
     */
    @Column(name = "USER_NAME")
    private String userName;

    @Column(name = "MOST_SIGNIFICANT_BITS")
    private Long mostSignificantBits;

    @Column(name = "LEAST_SIGNIFICANT_BITS")
    private Long leastSignificantBits;

    @Column(name = "TENANT_CODE")
    private String tenantCode;

    /**
     * 服务状态
     */
    @Column(name = "SERVICE_STATUS")
    private ServiceStatus serviceStatus;

    /**
     * 客户端类型
     */
    @Column(name = "TYPE")
    private SocketClientType type;

    /**
     * 最后连接时间
     */
    @Column(name = "LAST_CONNECT_TIME")
    private Date lastConnectTime;

    /**
     * 浏览器代理信息
     */
    @Column(name = "USER_AGENT")
    private String userAgent;

    /**
     * 最后连接的客户端ID
     */
    @Column(name = "LAST_CONNECT_CLIENT_ID")
    private String lastConnectClientId;

    /**
     * 联系的客户数量
     */
    @Column(name = "CONNECT_CUSTOMER_NUM")
    private Integer connectCustomerNum;

    @Column(name = "ADUIT")
    private Boolean aduit;

    public Boolean getAduit() {
        return aduit;
    }

    public void setAduit(Boolean aduit) {
        this.aduit = aduit;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    /**
     * 获取是否连接
     *
     * @return CONNECTED - 是否连接
     */
    public Boolean getConnected() {
        return connected;
    }

    /**
     * 设置是否连接
     *
     * @param connected 是否连接
     */
    public void setConnected(Boolean connected) {
        this.connected = connected;
    }

    /**
     * 获取用户名
     *
     * @return USER_NAME - 用户名
     */
    public String getUserName() {
        return userName;
    }

    /**
     * 设置用户名
     *
     * @param userName 用户名
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * @return MOST_SIGNIFICANT_BITS
     */
    public Long getMostSignificantBits() {
        return mostSignificantBits;
    }

    /**
     * @param mostSignificantBits
     */
    public void setMostSignificantBits(Long mostSignificantBits) {
        this.mostSignificantBits = mostSignificantBits;
    }

    /**
     * @return LEAST_SIGNIFICANT_BITS
     */
    public Long getLeastSignificantBits() {
        return leastSignificantBits;
    }

    /**
     * @param leastSignificantBits
     */
    public void setLeastSignificantBits(Long leastSignificantBits) {
        this.leastSignificantBits = leastSignificantBits;
    }

    /**
     * @return TENANT_CODE
     */
    public String getTenantCode() {
        return tenantCode;
    }

    /**
     * @param tenantCode
     */
    public void setTenantCode(String tenantCode) {
        this.tenantCode = tenantCode;
    }

    /**
     * 获取服务状态
     *
     * @return SERVICE_STATUS - 服务状态
     */
    public ServiceStatus getServiceStatus() {
        return serviceStatus;
    }

    /**
     * 设置服务状态
     *
     * @param serviceStatus 服务状态
     */
    public void setServiceStatus(ServiceStatus serviceStatus) {
        this.serviceStatus = serviceStatus;
    }

    /**
     * 获取客户端类型
     *
     * @return TYPE - 客户端类型
     */
    public SocketClientType getType() {
        return type;
    }

    /**
     * 设置客户端类型
     *
     * @param type 客户端类型
     */
    public void setType(SocketClientType type) {
        this.type = type;
    }

    /**
     * 获取最后连接时间
     *
     * @return LAST_CONNECT_TIME - 最后连接时间
     */
    public Date getLastConnectTime() {
        return lastConnectTime;
    }

    /**
     * 设置最后连接时间
     *
     * @param lastConnectTime 最后连接时间
     */
    public void setLastConnectTime(Date lastConnectTime) {
        this.lastConnectTime = lastConnectTime;
    }

    /**
     * 获取浏览器代理信息
     *
     * @return USER_AGENT - 浏览器代理信息
     */
    public String getUserAgent() {
        return userAgent;
    }

    /**
     * 设置浏览器代理信息
     *
     * @param userAgent 浏览器代理信息
     */
    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    /**
     * 获取最后连接的客户端ID
     *
     * @return LAST_CONNECT_CLIENT_ID - 最后连接的客户端ID
     */
    public String getLastConnectClientId() {
        return lastConnectClientId;
    }

    /**
     * 设置最后连接的客户端ID
     *
     * @param lastConnectClientId 最后连接的客户端ID
     */
    public void setLastConnectClientId(String lastConnectClientId) {
        this.lastConnectClientId = lastConnectClientId;
    }

    public Integer getConnectCustomerNum() {
        return connectCustomerNum;
    }

    public void setConnectCustomerNum(Integer connectCustomerNum) {
        this.connectCustomerNum = connectCustomerNum;
    }
}